
# DESCRIPTION
# Generates gene interestingness scores from a provided association file
#
# ARGUMENTS
# 1. input association file
# 2. output directory 
#
# CONTACT
# timo.p.erkkila@tut.fi
# http://www.cs.tut.fi/~erkkila2/

#!/bin/sh

INPUT=$1
OUTDIR=$2

mkdir $OUTDIR

OUTPUT="${OUTDIR}/GEXP_interestingness.tsv"

echo ""
echo "Reading associations from file:"
echo $INPUT
echo ""

GE="${OUTDIR}/GEXP_GEXP_association_index.tsv"
ME="${OUTDIR}/GEXP_METH_association_index.tsv"
CN="${OUTDIR}/GEXP_CNVR_association_index.tsv"
MI="${OUTDIR}/GEXP_MIRN_association_index.tsv"
GN="${OUTDIR}/GEXP_GNAB_association_index.tsv"
CL="${OUTDIR}/GEXP_CLIN_association_index.tsv"
SA="${OUTDIR}/GEXP_SAMP_association_index.tsv"

echo "Creating the following association index files:"
echo $GE
echo $ME
echo $CN
echo $MI
echo $GN
echo $CL
echo $SA
echo ""
echo "Writing the gene interestingness scores to file:"
echo $OUTPUT

python association_index.py $INPUT GEXP GEXP $GE
python association_index.py $INPUT GEXP METH $ME
python association_index.py $INPUT GEXP CNVR $CN
python association_index.py $INPUT GEXP MIRN $MI
python association_index.py $INPUT GEXP GNAB $GN
python association_index.py $INPUT GEXP CLIN $CL
python association_index.py $INPUT GEXP SAMP $SA

python ../list_op/list_sum.py $GE $ME $CN $MI $GN $CL $SA $OUTPUT